<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>CSS选择器权重比较</title>
  <style>
    .test1 {
      color:red;
    }
    .test1 {
      color:blue;
    }

    .test2 {
      color:red!important;
    }
    .test2 {
      color:blue;
    }

    #test3 {
      color:red;
    }
  </style>
</head>
<body class="body" id="body">
  <div class="test1">test1</div>
  <div class="test2">test2</div>
  <div id="test3" style="color:blue">
    test3
  </div>
</body>
</html>
